# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=hlextend
pkgver=17.be21920
pkgrel=3
pkgdesc='Pure Python hash length extension module.'
groups=('blackarch' 'blackarch-crypto')
arch=('any')
url='https://github.com/stephenbradshaw/hlextend'
license=('BSD')
depends=('python2')
makedepends=('git')
source=("git+https://github.com/stephenbradshaw/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

package() {
  cd $pkgname

  install -dm 755 "$pkgdir/usr/bin"
  install -dm 755 "$pkgdir/usr/share/$pkgname"

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.md
  install -Dm 644 COPYRIGHT.txt "$pkgdir/usr/share/licenses/$pkgname/COPYRIGHT"

  rm README.md COPYRIGHT.txt

  cp -a * "$pkgdir/usr/share/$pkgname/"
}

